<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="joda" uri="http://www.joda.org/joda/time/tags"%>


<div class="bandeau_titre">
	<div class="texte">
		<h1>Historique des virements :</h1>
	</div>
</div>
<br />
<br />

<form method="POST" action="${pageContext.request.contextPath}/client/virement/historique/validation.html">
	<table>
		<tr>
			<td>Choix du compte :</td>
			<td><select name="moisChoisi">
					<c:forEach items="${listCompte}" var="compteUnique">
						<option value=<c:out value="${compteUnique.id}"/>>
							<c:out value="${compteUnique.nomCompte}" />
						</option>
					</c:forEach>
			</select></td>
			<td>
				<input type="submit" value="Valider">
			</td>
		</tr>
	</table>
</form>

<c:choose>
	<c:when test="${not empty compte}">
		<table class="tableau_comptes">
			<tr>
				<th colspan="4"><c:out value="${compte.nomCompte}" /> : compte
					n°<c:out value="${compte.id }" />
				</th>
			</tr>
			<tr>
				<th width="5%">id</th>
				<th width="20%">Date Operation</th>
				<th width="55%">libelle</th>
				<th width="20%">montant</th>
			</tr>

			<c:forEach items="${listVirement }" var="operation">
				<tr>
					<td>${operation.id}</td>
					<td><joda:format value="${operation.dateOperation}"
					pattern="dd-MM-yyyy" /></td>
					
					<td  class="libelle">${operation.libelle}</td>
					<td>${operation.montant}</td>
				</tr>
			</c:forEach>
		</table>
	</c:when>
	<c:otherwise>

	</c:otherwise>
</c:choose>


